<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_JS流程控制</title>
</head>
<body>
<script>
    /*let username=''
    if(!username){
        alert('用户名不能为空')
    }else {
        alert('welcome'+username)
    }*/

    let gender=10;
    switch (gender){
        case 1:
            console.log('男');
            break;
        case 0:
            console.log("女")
            break;
        default:
            console.log("沃尔玛购物袋")

    }
    let names=['张三','李四','王五','赵丽颖']
    for (let i = 0; i < names.length; i++) {
        console.log(names[i]);

    }
    for (let a of names){
        console.log(a)
    }

</script>
</body>
</html>